{extend name="layout/layout" /}

{block name="content"}
<div class="row">
    <div class="col-md-12">
        <div class="portlet light">
            <div class="portlet-title">
                <div class="caption">
                    <i class="icon-share font-dark"></i>
                    <span class="caption-subject font-dark bold uppercase"> 添加台账 </span>
                </div>
                <div class="actions">
                    <a class="btn btn-circle btn-icon-only btn-default fullscreen" href="javascript:;" data-original-title="" title=""> </a>
                </div>
            </div>
            <div class="portlet-body">
                <form id="ajax-form" class="form-horizontal" method="post" enctype="multipart/form-data">
                    <div class="form-body">
                        <div class="row" style="margin-bottom: 10px;">
                            <div class="col-md-9">
                                <div class="form-inline">
                                    <label class="control-label col-md-3">
                                        选择乡村
                                        <span class="required">*</span>
                                    </label>
                                    <div class="col-md-9">
                                        {include file="common:selectarea" /}
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        台账年度
                                        <span class="required">*</span>
                                    </label>
                                    <div class="col-md-6">
                                        <input type="text" class="form-control date-year" name="year" value="" >
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        享受政策
                                        <span class="required">*</span>
                                    </label>
                                    <div class="col-md-9">
                                        <div id="policy-group">
                                            <div class="policy-div">
                                                <div class="row">
                                                    <div class="col-md-4">
                                                        <select class="form-control" name="policyType">
                                                            <option value="0">请选择</option>
                                                            {foreach name="policyTypes" item="policyType" key="policyTypekey"}
                                                                <option value="{$policyTypekey}">{$policyType}</option>
                                                            {/foreach}
                                                        </select>
                                                    </div>
                                                    <!--<div class="col-md-1"><button type="button" class="btn btn-danger remove-policy"><i class="fa fa-close"></i></button></div>-->
                                                </div>
                                                <div class="row policySpec-div" style="margin-top: 10px;">
                                                    <div class="col-md-3">
                                                        <select class="form-control spec-type" name="specType">
                                                            <option value="1">分季</option>
                                                            <option value="2">分月</option>
                                                            <option value="0">无</option>
                                                        </select>
                                                    </div>
                                                    <div class="col-md-3 quarter-div">
                                                        <select class="form-control quarter" name="quarter">
                                                            <option value="1">春季</option>
                                                            <option value="2">夏季</option>
                                                            <option value="3">秋季</option>
                                                            <option value="4">冬季</option>
                                                        </select>
                                                    </div>
                                                    <div class="col-md-3 month-div hide">
                                                        <select class="form-control month" name="month">
                                                            <option value="1">1月</option>
                                                            <option value="2">2月</option>
                                                            <option value="3">3月</option>
                                                            <option value="4">4月</option>
                                                            <option value="5">5月</option>
                                                            <option value="6">6月</option>
                                                            <option value="7">7月</option>
                                                            <option value="8">8月</option>
                                                            <option value="9">9月</option>
                                                            <option value="10">10月</option>
                                                            <option value="11">11月</option>
                                                            <option value="12">12月</option>
                                                        </select>
                                                    </div>
                                                    <div class="col-md-3 explain-div">
                                                        <select class="form-control explain" name="explain">
                                                            <option value="1">金额补助</option>
                                                            <option value="2">其他说明</option>
                                                        </select>
                                                    </div>
                                                    <div class="col-md-1">
                                                        <button type="button" class="btn btn-success addPolicySpec-btn"><i class="fa fa-plus"></i></button>
                                                        <!--<button type="button" class="btn btn-danger removePolicySpec-btn"><i class="fa fa-minus"></i></button>-->
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <button type="button" class="btn btn-success addPolicy-btn" style="margin-top: 10px;">
                                            <i class="fa fa-plus"></i> 添加享受政策
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        备注说明
                                    </label>
                                    <div class="col-md-9">
                                        <div class="mt-radio-inline">
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="isRemark" value="1" >
                                                需要
                                                <span></span>
                                            </label>
                                            <label class="mt-radio mt-radio-outline">
                                                <input type="radio" class="" name="isRemark" value="2" checked>
                                                不需要
                                                <span></span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <input type="hidden" name="id" value="">

                        <hr />
                        <div class="row">
                            <div class="form-actions">
                                <div class="col-md-offset-2 col-md-10">
                                    <button type="button" id="form-submit" class="btn blue save-btn">
                                        保存 <i class="fa fa-floppy-o"></i>
                                    </button>
                                    <button type="button" class="btn default" onclick="history.go(-1);">
                                        返回 <i class="fa fa-mail-forward"></i>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<input type="hidden" class="save_url" value="{:url('admin/'.strtolower($model).'/savepost')}">
{/block}

{block name="pagescript"}
<script src="__STATIC__/admin/pages/js/povertypolicyledger.js" type="text/javascript"></script>
{/block}